/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Zeus
 */
@Entity
@Table(name = "pg_usuario", catalog = "prog_acad", schema = "")
@NamedQueries({
    @NamedQuery(name = "PgUsuario.findAll", query = "SELECT p FROM PgUsuario p"),
    @NamedQuery(name = "PgUsuario.findByPgidUsuario", query = "SELECT p FROM PgUsuario p WHERE p.pgidUsuario = :pgidUsuario"),
    @NamedQuery(name = "PgUsuario.findByPgPassword", query = "SELECT p FROM PgUsuario p WHERE p.pgPassword = :pgPassword")})
public class PgUsuario implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "pg_idUsuario", nullable = false, length = 8)
    private String pgidUsuario;
    @Basic(optional = false)
    @Column(name = "pg_password", nullable = false, length = 50)
    private String pgPassword;

    public PgUsuario() {
    }

    public PgUsuario(String pgidUsuario) {
        this.pgidUsuario = pgidUsuario;
    }

    public PgUsuario(String pgidUsuario, String pgPassword) {
        this.pgidUsuario = pgidUsuario;
        this.pgPassword = pgPassword;
    }

    public String getPgidUsuario() {
        return pgidUsuario;
    }

    public void setPgidUsuario(String pgidUsuario) {
        this.pgidUsuario = pgidUsuario;
    }

    public String getPgPassword() {
        return pgPassword;
    }

    public void setPgPassword(String pgPassword) {
        this.pgPassword = pgPassword;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgidUsuario != null ? pgidUsuario.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgUsuario)) {
            return false;
        }
        PgUsuario other = (PgUsuario) object;
        if ((this.pgidUsuario == null && other.pgidUsuario != null) || (this.pgidUsuario != null && !this.pgidUsuario.equals(other.pgidUsuario))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgUsuario[ pgidUsuario=" + pgidUsuario + " ]";
    }
    
}
